package com.betterwood.dragon.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.data.annotation.Id;
import org.springframework.data.mongodb.core.mapping.Document;
import org.springframework.format.annotation.DateTimeFormat;

import javax.validation.constraints.NotBlank;
import java.time.LocalDateTime;

/**
 * @author zhengyanhua
 * @create 2021-03-19 9:26
 */
@Data
@Document(value = "sys_shop")
public class SysShop {

    @Id
    private String id;

    @NotBlank(message = "店铺名称不能为空")
    private String shopName;

    @NotBlank(message = "店铺地址不能为空")
    private String address;

    @NotBlank(message = "店铺城市能为空")
    private String city;

    private String logoUrl;

    private String wifiAccount;

    private String wifiPassword;

    private String desc;

    private String qrUrl;//小程序二维码

    private long shopNum;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime createTime;

    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private LocalDateTime updateTime;
}
